package com.jdy.hotel.support;

import androidx.lifecycle.MutableLiveData;

import com.jdy.hotel.check.CheckViewModel;
import com.jdy.hotel.net.ResponseData;
import com.jdy.hotel.net.ResponseDataListener;

/**
 * 继承数CheckViewModel
 * 并实现数据请求接口
 */
public class BaseViewModel extends CheckViewModel implements ResponseDataListener<ResponseData> {

    private MutableLiveData<ResponseData> respondData = new MutableLiveData<>();

    @Override
    public void onRespond(ResponseData data) {
        respondData.setValue(data);
    }

    public MutableLiveData<ResponseData> getRespondData() {
        return respondData;
    }
}
